import matplotlib.pyplot as plt
import numpy as np


plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签SimHei
x_axis_data = [0, 2,  4,  6, 8, 10, 12]  # x
y_axis_data = [1400, 1300, 1400, 1200, 1000, 900, 800]  # y
font = {'color':'white','size':18}


##plt.plot(x_axis_data, y_axis_data, 'b*--', alpha=0.5, linewidth=1, label='acc')  # 'bo-'表示蓝色实线，数据点实心原点标注
## plot中参数的含义分别是横轴值，纵轴值，线的形状（'s'方块,'o'实心圆点，'*'五角星   ...，颜色，透明度,线的宽度和标签 ，

plt.tick_params(axis='x', colors='antiquewhite')
plt.tick_params(axis='y', colors='antiquewhite')


plt.xlabel('时间（h）', fontdict=font)  # x_label
plt.ylabel('功率（kw）', fontdict=font)  # y_label
plt.plot(x_axis_data, y_axis_data, alpha=1.0, linestyle='-', color='antiquewhite', linewidth=5)

ax = plt.gca() # 获取当前的axes
ax.spines['left'].set_color('antiquewhite')
ax.spines['bottom'].set_color('antiquewhite')
ax.spines['bottom'].set_linewidth(4);###设置底部坐标轴的粗细
ax.spines['left'].set_linewidth(4);####设置左边坐标轴的粗细

plt.savefig('1.png', transparent=True)
plt.show()

